home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / miscuni.com / TPCLOCK.DOC < prev    next >
Encoding:
Text File  |  1989-05-25  |  1.8 KB  |  54 lines

  1. TPCLOCK
  2. -------
  3.  
  4. TPClock is a unit that sits on top of TPCRT and allows display of
  5. an on screen clock during program execution.  TPClock provides
  6. replacements for <ReadKeyWord>, <KeyPressed>, <ReadKey>, and the
  7. <CheckKbd> functions.  Each replacement calls the procedure <ShowClock>
  8. then executes the corresponding routine in TPCRT.  The <ShowClock>
  9. procedure is also exported for use in loops that are not
  10. dependent on keyboard input.  The following constants and variables
  11. are also exported.
  12.  
  13.    Const
  14.      ClockEnabled : boolean = False;
  15.      CalendarEnabled : boolean = False;
  16.  
  17. TPClock will not display on screen by default, one or both of
  18. these constants should be set to true for the clock display to be
  19. activated.
  20.  
  21.       ClockTimeMask : String[20] = 'HH:mm:ss te';
  22.       ClockDateMask : String[20] = 'MM/dd/yy';
  23.       ClockSepStr   : String[20] = ' ';
  24.  
  25. TPClock displays the date first followed by the constant
  26. ClockSepStr followed by the time.  ClockTimeMask & ClockDateMask
  27. determine the format of the time and date on the screen.
  28.  
  29.       ClockY : byte = 1;
  30.       ClockX : byte = 59;
  31.  
  32. These are the coordinates where the first character of the date
  33. will display.  If <CalanderEnabled> is false, the time will NOT
  34. be shifted right to fill in this area.  The time will always be
  35. displayed at ClockY, ClockX + Length(ClockDateMask) +
  36. Length(ClockSepStr).
  37.  
  38.    Var
  39.      ClockAttr : byte;
  40.  
  41. The attribute in which to display the time/date string.  Defaults
  42. to the value of <TextAttr> at initialization (program startup).
  43.  
  44. A conditional define (UseClock) to include the TPClock unit should be
  45. added to the TPDEFINE.INC file.  And TPClock should be added to the Uses
  46. statement of TPMenu, TPPick, TPEdit and TPEntry in the following
  47. manner:
  48.  
  49. {$IFDEF UseClock}
  50.   TPClock,
  51. {$ENDIF}
  52.  
  53.  
  54.